<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>使用arcTo()方法绘制一条弧线</title>
<style type="text/css">
canvas {
	border:1px solid #000;
}
</style>
<script type="text/javascript">
function Draw(){
	var canvas=document.getElementById("canvas");
	var context = canvas.getContext("2d");
	// 先绘制灰色的辅助线段，宽2像素
	context.beginPath();
	context.moveTo(80,120);
	context.lineTo(150,60);
	context.lineTo(180,130);	
	context.strokeStyle="rgba(0,0,0,0.4)";
	context.lineWidth=2;
	context.stroke();
	// 再绘制一条圆弧，宽2像素，线条颜色为橘黄色
	context.beginPath();
	context.moveTo(80,120);
	context.arcTo(150, 60, 180, 130, 50); 
	context.strokeStyle="rgba(255,135,0,1)";
	context.stroke();
	context.lineTo(150,160);
	context.stroke();
}
window.addEventListener("load",Draw,true);
</script>
</head>
<body style="overflow:hidden">
<canvas id="canvas" width="400" height="400">你的浏览器不支持该功能！</canvas>
</body>
</html>
